package com.face.server.repository;

import com.face.server.entity.Dormitory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * Created by ryan on 2018/1/25.
 */
public interface DormitoryRepository extends MongoRepository<Dormitory,String>{

    Dormitory findByDormitoryBuildNumAndRoomNumber(Integer buildNum,Integer roomNum);

    Long countByStudentsNameExistsAndDisableIsFalse();

    Page<Dormitory> findByDormitoryBuildNumIn(List<Integer> buildList, Pageable pageable);
}
